﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace Himp.Platform.Migrations
{
    /// <inheritdoc />
    public partial class add_table_OpenApiFuncConfig : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_OpenApiFuncConfigs",
                table: "OpenApiFuncConfigs");

            migrationBuilder.DropColumn(
                name: "ReqType",
                table: "OpenApiFuncConfigs");

            migrationBuilder.RenameTable(
                name: "OpenApiFuncConfigs",
                newName: "MainOpenApiFuncConfig");

            migrationBuilder.AddPrimaryKey(
                name: "PK_MainOpenApiFuncConfig",
                table: "MainOpenApiFuncConfig",
                column: "Id");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropPrimaryKey(
                name: "PK_MainOpenApiFuncConfig",
                table: "MainOpenApiFuncConfig");

            migrationBuilder.RenameTable(
                name: "MainOpenApiFuncConfig",
                newName: "OpenApiFuncConfigs");

            migrationBuilder.AddColumn<int>(
                name: "ReqType",
                table: "OpenApiFuncConfigs",
                type: "integer",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddPrimaryKey(
                name: "PK_OpenApiFuncConfigs",
                table: "OpenApiFuncConfigs",
                column: "Id");
        }
    }
}
